<!--
 * @FilePath     : /study_code/jquery/ajax-options-context.html
 * @Description  : $.ajax({ context: xx }) 配置钩子中的 this 指向
 * @Date         : 2025-04-17 14:52:59
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-04-17 14:54:12
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <!-- <link rel="stylesheet" href="" /> -->
  </head>
  <body>
    <h2>options-context</h2>

    <script src="/jquery/dist/jquery.min.js"></script>
    <script src="/jquery/ajax/common.js"></script>
    <script>
      $.ajax({
        url: baseUrl.root + baseUrl.ajax + '/',
        context: document.body,
        type: 'GET',
        type: 'GET',
        success: function () {
          console.log(1, '钩子中 this 指向', this) // body
        },
      })
    </script>
  </body>
</html>
